package com.jeomo.sys.starter.service;

import com.jeomo.base.starter.service.IBaseService;
import com.jeomo.common.core.dto.PageQueryDto;
import com.jeomo.common.core.dto.PageResponseDto;
import com.jeomo.sys.starter.entity.User;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jeomo
 * @since 2019-03-22
 */
public interface IUserService extends IBaseService<User> {

    final String ADMIN_USER = "admin";

    /**
     * 根据用户名查询号用户
     * @param username
     * @param username
     * @return
     */
    User queryByUsername(String username);

    /**
     * 新建或修改用户
     * @param user
     * @param roles
     * @return
     */
    boolean save(User user, List<String> roles);


    @Override
    PageResponseDto pageSearch(PageQueryDto pageRequest);
}
